package com.example.shixun.service.impl;

import com.example.shixun.dao.CourseComentDao;
import com.example.shixun.pojo.CourseComent;
import com.example.shixun.service.CourseComentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CourseComentServiceImpl implements CourseComentService {

    @Resource
    private CourseComentDao courseComentDao;


    @Override
    public Integer saveCourseComent(CourseComent courseComent) {
        return courseComentDao.saveCourseComent(courseComent);
    }

    @Override
    public Integer deleteByUserId(Integer userId) {
        return courseComentDao.deleteByUserId(userId);
    }

    @Override
    public Integer deleteByCourseId(Integer courseId) {
        return courseComentDao.deleteByCourseId(courseId);
    }

    @Override
    public List<CourseComent> selectByUserId(Integer userId) {
        return courseComentDao.selectByUserId(userId);
    }

    @Override
    public List<CourseComent> selectByCourseId(Integer courseId) {
        return courseComentDao.selectByCourseId(courseId);
    }

    @Override
    public List<CourseComent> selectAll() {
        return courseComentDao.selectAll();
    }

    @Override
    public Integer updateCourseComent(Integer userId, Integer courseId) {
        return courseComentDao.updateCourseComent(userId,courseId);
    }
}
